<!-- 
 *  Copyright [2014] UW-Parkside
 * Authors: Jasmine Griffiths, Matthew Zygowicz, Armando Narvaez
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
*/
-->

<!-- 'hiddenUserBox.php' is the sticky window when an 'admin' user wants to add more users -->
<!-- Fields are:  ID, Username, Password, Confirm Password, and Realms -->
<?php
        print "<form id=\"userEntryForm\" action=\"/index.php/kat/usermanager\" method=\"POST\">";
    ?>
    <p><strong>User Management</strong></p>
    <hr />
    <!-- -----------Username Field------------- -->
    <p>
        <label class="field" for="username">Username</label>
        <input class="reducedInput" name="username" type="text" placeholder="" required="">
    </p>
    <!-- -----------End Username Field------------- -->

    <!-- -----------Password Field------------- -->
    <p id="password" class="">
        <label class="field" for="password">Password</label>
        <input class="reducedInput" name="password" type="text" placeholder="">
    </p>
    <!-- -----------End Password Field------------- -->
    
    <!-- -----------Confirm Password Field------------- -->
    <p id="confirmPassword" class="">
        <label class="field" for="confirmPassword">Confirm</label>
        <input class="reducedInput" name="confirmPassword" type="text" placeholder="">
    </p>
    <!-- -----------Confirm Password Field------------- -->
    
    <!-- -----------Realms Field------------- -->
    <p>
        <label class="field" for="realmSelect">Realms</label>
        <select class="reducedInput" name="realmSelect">
            <?php
            foreach ($realmList as $realm) {
                print "<option value='{$realm['vcRealm']}'>{$realm['vcRealm']}</option>";
            }
            ?>
        </select>
    </p>
    <!-- -----------End Realms Field------------- -->

    <!-- -----------Hidden ID Field------------- -->
    <p class="hidden">
        <label hidden for="id">ID</label>
        <input name="id" type="text" placeholder="" hidden >
    </p>
    <!-- -----------End Hidden ID Field------------- -->
    
    <!-- ----------- Buttons ------------- -->
    <input id="deleteButton" onclick="return confirm('Are you sure you want to delete the user?')" class="reducedSize right yellow button hidden" value="Delete User" name="submit" type="submit">
    <input id="passwordButton" onclick="changePassword()" class="reducedSize right yellow button hidden" value="Change Password" name="submit" type="button">
    <input id="submitButton" class="reducedSize right yellow button" value="Add User" name="submit" type="submit">
    <input class="reducedSize right blue button hidden" id="resetButton" value="Reset/Clear Form" name="reset" type="reset" onclick="resetUserEntryForm()">
    <!-- ----------- End Buttons ------------- -->
    
    </form>